const UserService = require('../service/UserService');


const UserController = {
    addUser: async (req, res) => {
        let r = await UserService.addUser(req.body);
        res.send('success to add a user named ' + req.body.name);
    },
    findAll: async (req, res) => {
        let r = await UserService.findAll();
        res.send(r);
    },
    findOne: async  (req, res) => {
        UserController.findOne(req.body)
    }
};

module.exports = UserController;